home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ Control Panel Hide 1.xpl < prev    next >
Text File  |  1999-08-24  |  4KB  |  119 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 3.1"
  2. "TYPE"="6"
  3. "COUNT"="5"
  4. "UIPATH"="Appearance\Control Panel\General Icons"
  5. "NAME"="Visible Items #1"
  6. "VERSION"="1.13"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display "System Properties" applet"
  9. "TEXT 2"="Display "Display Properties" applet"
  10. "TEXT 3"="Display "Add/Remove Programs" applet"
  11. "TEXT 4"="Display "Internet Control Panel" applet"
  12. "TEXT 5"="Display "Network Properties" applet"
  13. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  14. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  15. "DESCRIPTION 3"="NOTE: Hiding the "Internet Control Panel" applet will also hide the "Users" applet on Windows 95 or Windows 98 systems."
  16. "AUTHOR"="Xteq Systems"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  19. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  20. "COMMENT 3"="See also: MS KB Q207750"
  21.  
  22.  
  23. '******************************************************************
  24. '***                MASTER TEMPLATE (1 of X)                   ****
  25. '******************************************************************
  26. sVals=""
  27. sVals2=Array("sysdm.cpl","desk.cpl","appwiz.cpl","Inetcpl.cpl","netcpl.cpl") 
  28. sVals3=Array("sysdm.cpl","desk.cpl","appwiz.cpl","Inetcpl.cpl","netcpl.cpl") 
  29. '******************************************************************
  30. '      sVals2 = Windows 9x/NT  /// sVals2 = Windows 2000
  31. '******************************************************************
  32. '*** Keep an eye on the order (must be the same as "TEXT x") ! ****
  33. '******************************************************************
  34. sPath="HKCU\Control Panel\Don't Load\"
  35. sFile="CONTROL.INI"
  36. sFileSec="Don't Load"
  37.  
  38.  
  39.  
  40. SUB Plugin_Initialize
  41.  if GetWinVer=4 then
  42.     sVals=sVals3
  43.  else
  44.     sVals=sVals2
  45.  end if
  46.  
  47.  for i=0 to UBound(sVals)
  48.      Call ReadIt(i+1,sVals(i)) 
  49.  next 
  50. END SUB
  51.  
  52. Sub ReadIt(ITM,VAL)
  53.   If GetWinVer=2 or GetWinVer=4 then
  54.  
  55.      s=RegReadValue(sPath & VAL)
  56.      if IsEmpty(s)=true then
  57.         Call SetUIElement(ITM,true)
  58.      else
  59.         Call SetUIElement(ITM,false)
  60.      end if
  61.  
  62.   else
  63.  
  64.     s=IniReadValue(sFile,sFileSec,VAL)
  65.     if len(s)>0 then
  66.        Call SetUIElement(ITM,false)
  67.     else
  68.        Call SetUIElement(ITM,true)
  69.     end if
  70.      
  71.   end if
  72.      
  73. End Sub
  74.  
  75. 'Called when the Plugin should validate the Data the user has entered
  76. SUB Plugin_CheckData(ElementIndex)
  77. END SUB
  78.  
  79. 'Called when the Plugin should apply the changes
  80. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  81.  for i=0 to UBound(sVals)
  82.      Call WriteIt(i+1,sVals(i)) 
  83.  next 
  84. END SUB
  85.  
  86. Sub WriteIt(ITM,VAL)
  87.  b=GetUIElement(ITM)
  88.  'b=GetUIElement(-1) 'crash
  89.  if b=true then
  90.     'Display it
  91.  
  92.     if GetWinVer=2 or GetWinVer=4 then  
  93.        s=RegReadValue(sPath & VAL)
  94.        if IsEmpty(s)=false then
  95.           Call RegDeleteValue(sPath & VAL)
  96.        end if
  97.     else
  98.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  99.     end if
  100.  
  101.  else
  102.    'Hide it
  103.    
  104.    if GetWinVer=2 or GetWinVer=4 then
  105.       Call RegWriteValue(sPath & VAL,"1",1) 
  106.    else
  107.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  108.    end if
  109.  
  110.  end if   
  111. End Sub
  112.  
  113.  
  114. 'Called when the Plugin is about to be removed from memory
  115. SUB Plugin_Terminate
  116. END SUB
  117.  
  118.  
  119.